export class storeproductattr {
  id?: number;
  ruleName = '';
  ruleValue: ruleObj[] = []
  attrName = ''
  attrValues = ''
  type = ''
  isDel = ''
  constructor(data?: storeproductattr) {
    data && this.setProps(data);
  }

  setProps(data: storeproductattr) {
    (Object.keys(this) as Array<keyof Istoreproductattr>).forEach((key) => {
      // @ts-ignore
      this[key] = data[key]
    })
  }
}

export type Istoreproductattr = Omit<storeproductattr, 'setProps'>


export interface ruleObj {
  value: string
  detail: string[]
  inputVisible: boolean
  attrsVal: string
}
